package com.library.entity;

import javax.persistence.*;

/**
 * Entity:数量统计
 * Created by mhy on 2018/1/16.
 */
@Entity
@Table(name="count")
public class Count {
    private Integer countId;   //countID
    private Integer staffCount;
    private Integer bookCount;
    private Integer borrowCount;
    private Integer evaluateCount;
    private Integer searchCount;
    private Integer paymentCount;
    private String date;        //日期 精确到年 月
    private Staff staff;

    @Id
    @GeneratedValue(strategy=GenerationType.AUTO)
    public Integer getCountId() {
        return countId;
    }

    public void setCountId(Integer countId) {
        this.countId = countId;
    }

    public Integer getStaffCount() {
        return staffCount;
    }

    public void setStaffCount(Integer staffCount) {
        this.staffCount = staffCount;
    }

    public Integer getBookCount() {
        return bookCount;
    }

    public void setBookCount(Integer bookCount) {
        this.bookCount = bookCount;
    }

    public Integer getBorrowCount() {
        return borrowCount;
    }

    public void setBorrowCount(Integer borrowCount) {
        this.borrowCount = borrowCount;
    }

    public Integer getEvaluateCount() {
        return evaluateCount;
    }

    public void setEvaluateCount(Integer evaluateCount) {
        this.evaluateCount = evaluateCount;
    }

    public Integer getSearchCount() {
        return searchCount;
    }

    public void setSearchCount(Integer searchCount) {
        this.searchCount = searchCount;
    }

    public Integer getPaymentCount() {
        return paymentCount;
    }

    public void setPaymentCount(Integer paymentCount) {
        this.paymentCount = paymentCount;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    @ManyToOne(cascade=CascadeType.PERSIST)
    @JoinColumn(name="staffId")
    public Staff getStaff() {
        return staff;
    }

    public void setStaff(Staff staff) {
        this.staff = staff;
    }
}
